```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>分布式集群限流 - Sentinel 深度解析</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
            color: #333;
            line-height: 1.6;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .highlight-box {
            background: linear-gradient(to right, rgba(110, 142, 251, 0.1), rgba(167, 119, 227, 0.1));
            border-left: 4px solid #6e8efb;
        }
        .drop-cap::first-letter {
            font-size: 3.5em;
            float: left;
            line-height: 0.8;
            margin: 0.1em 0.2em 0 0;
            color: #6e8efb;
            font-family: 'Noto Serif SC', serif;
            font-weight: 700;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-4 md:py-32">
        <div class="container mx-auto max-w-5xl text-center">
            <div class="inline-block px-3 py-1 mb-4 text-xs font-semibold text-indigo-100 bg-white bg-opacity-20 rounded-full">
                <i class="fas fa-shield-alt mr-2"></i>分布式系统防护
            </div>
            <h1 class="text-4xl md:text-6xl font-bold mb-6 leading-tight">Sentinel 集群限流架构</h1>
            <p class="text-xl md:text-2xl font-light max-w-3xl mx-auto mb-8 opacity-90">
                构建高可用分布式系统的流量控制解决方案
            </p>
            <div class="flex flex-wrap justify-center gap-4 mt-10">
                <a href="#overview" class="px-8 py-3 bg-white text-indigo-600 font-semibold rounded-full hover:bg-opacity-90 transition-all">
                    <i class="fas fa-book-open mr-2"></i>核心原理
                </a>
                <a href="#implementation" class="px-8 py-3 bg-white bg-opacity-20 text-white font-semibold rounded-full hover:bg-opacity-30 transition-all">
                    <i class="fas fa-code mr-2"></i>实现方案
                </a>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto px-4 py-16 max-w-5xl">
        <!-- Overview Section -->
        <section id="overview" class="mb-20">
            <div class="flex items-center mb-10">
                <div class="w-12 h-1 bg-indigo-500 mr-4"></div>
                <h2 class="text-3xl font-bold text-gray-800">集群限流原理剖析</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8 mb-12">
                <div class="bg-white p-8 rounded-xl shadow-md card-hover">
                    <div class="text-indigo-500 text-4xl mb-4">
                        <i class="fas fa-project-diagram"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-gray-800">分布式流量控制</h3>
                    <p class="text-gray-600">Sentinel 通过协调组件实现跨服务实例的流量规则同步，确保限流策略在分布式环境中一致生效，避免单个节点过载影响系统整体稳定性。</p>
                </div>
                <div class="bg-white p-8 rounded-xl shadow-md card-hover">
                    <div class="text-indigo-500 text-4xl mb-4">
                        <i class="fas fa-sliders-h"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-gray-800">灵活调控策略</h3>
                    <p class="text-gray-600">支持QPS、并发线程数、系统负载等多种调控维度，可根据业务场景灵活配置，实现精准的流量控制。</p>
                </div>
            </div>
            
            <div class="highlight-box p-8 rounded-lg mb-12">
                <h3 class="text-xl font-bold mb-4 text-gray-800">核心工作原理</h3>
                <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                    <div class="flex items-start">
                        <div class="bg-indigo-100 text-indigo-600 p-2 rounded-lg mr-4">
                            <i class="fas fa-database text-lg"></i>
                        </div>
                        <div>
                            <h4 class="font-semibold mb-2">规则存储</h4>
                            <p class="text-sm text-gray-600">限流规则集中存储在Redis/Zookeeper</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="bg-indigo-100 text-indigo-600 p-2 rounded-lg mr-4">
                            <i class="fas fa-sync-alt text-lg"></i>
                        </div>
                        <div>
                            <h4 class="font-semibold mb-2">实时同步</h4>
                            <p class="text-sm text-gray-600">变更实时推送到所有服务实例</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="bg-indigo-100 text-indigo-600 p-2 rounded-lg mr-4">
                            <i class="fas fa-chart-line text-lg"></i>
                        </div>
                        <div>
                            <h4 class="font-semibold mb-2">全局监控</h4>
                            <p class="text-sm text-gray-600">Dashboard展示集群整体流量状态</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="bg-white p-6 rounded-xl shadow-md">
                <h3 class="text-xl font-bold mb-4 text-gray-800">集群限流架构图</h3>
                <div class="mermaid">
                    graph TD
                    A[客户端请求] --> B[服务实例1]
                    A --> C[服务实例2]
                    A --> D[服务实例3]
                    B --> E[(Redis集群)]
                    C --> E
                    D --> E
                    E --> F[Sentinel Dashboard]
                    style A fill:#f0f9ff,stroke:#338
                    style B fill:#f0fff4,stroke:#0a0
                    style C fill:#f0fff4,stroke:#0a0
                    style D fill:#f0fff4,stroke:#0a0
                    style E fill:#fff6f6,stroke:#d33
                    style F fill:#f5f0ff,stroke:#83e
                </div>
            </div>
        </section>

        <!-- Implementation Section -->
        <section id="implementation" class="mb-20">
            <div class="flex items-center mb-10">
                <div class="w-12 h-1 bg-indigo-500 mr-4"></div>
                <h2 class="text-3xl font-bold text-gray-800">实现方案详解</h2>
            </div>
            
            <div class="drop-cap bg-white p-8 rounded-xl shadow-md mb-12">
                <p>在分布式环境中实现集群限流，<strong>Sentinel</strong> 是一个强大且灵活的工具。Sentinel 提供了集群限流的机制，确保在分布式系统中对流量进行有效控制，防止某个服务实例过载。</p>
                <p class="mt-4">Sentinel 在分布式环境中实现集群限流的关键在于流量控制规则的分布式同步和数据共享。通过使用 Redis 或 Zookeeper 等协调组件，Sentinel 可以确保各个服务实例遵循一致的限流规则，从而有效控制系统的整体流量，防止过载，并提高系统的稳定性和容错能力。</p>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8 mb-12">
                <div>
                    <h3 class="text-2xl font-bold mb-6 text-gray-800 flex items-center">
                        <span class="bg-indigo-100 text-indigo-600 w-10 h-10 rounded-full flex items-center justify-center mr-4">1</span>
                        流量控制原理
                    </h3>
                    <div class="bg-gray-50 p-6 rounded-lg">
                        <p class="mb-4"><i class="fas fa-check-circle text-green-500 mr-2"></i>基于QPS(每秒查询数)的精确控制</p>
                        <p class="mb-4"><i class="fas fa-check-circle text-green-500 mr-2"></i>支持响应时间作为限流指标</p>
                        <p class="mb-4"><i class="fas fa-check-circle text-green-500 mr-2"></i>可配置时间窗口大小</p>
                        <p><i class="fas fa-check-circle text-green-500 mr-2"></i>多种流量整形策略</p>
                    </div>
                </div>
                <div>
                    <h3 class="text-2xl font-bold mb-6 text-gray-800 flex items-center">
                        <span class="bg-indigo-100 text-indigo-600 w-10 h-10 rounded-full flex items-center justify-center mr-4">2</span>
                        集群模式特点
                    </h3>
                    <div class="bg-gray-50 p-6 rounded-lg">
                        <p class="mb-4"><i class="fas fa-check-circle text-green-500 mr-2"></i>多实例协同限流</p>
                        <p class="mb-4"><i class="fas fa-check-circle text-green-500 mr-2"></i>避免单点限流不准确</p>
                        <p class="mb-4"><i class="fas fa-check-circle text-green-500 mr-2"></i>全局流量视图</p>
                        <p><i class="fas fa-check-circle text-green-500 mr-2"></i>动态规则调整</p>
                    </div>
                </div>
            </div>
            
            <div class="mb-12">
                <h3 class="text-2xl font-bold mb-6 text-gray-800">实现步骤</h3>
                <div class="space-y-4">
                    <div class="flex items-start">
                        <div class="bg-indigo-500 text-white rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mt-1 mr-4">1</div>
                        <div>
                            <h4 class="font-bold text-lg mb-1">集群配置</h4>
                            <p class="text-gray-600">在 Sentinel 的集群模式下，各个服务实例会通过分布式协调组件（如 Redis、Zookeeper）来实现数据的共享和同步。</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="bg-indigo-500 text-white rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mt-1 mr-4">2</div>
                        <div>
                            <h4 class="font-bold text-lg mb-1">数据共享与同步</h4>
                            <p class="text-gray-600">Sentinel 使用分布式协调组件来同步限流规则和指标数据。可以将流量控制规则和实时的流量数据存储到 Redis 中，所有实例都可以从 Redis 中获取最新的限流规则和指标。</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="bg-indigo-500 text-white rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mt-1 mr-4">3</div>
                        <div>
                            <h4 class="font-bold text-lg mb-1">规则传播</h4>
                            <p class="text-gray-600">限流规则和配置需要在所有实例中同步。在 Sentinel 集群模式中，当规则发生变化时，这些变化会被传播到集群中的所有实例，确保每个实例遵循相同的限流规则。</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="bg-indigo-500 text-white rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mt-1 mr-4">4</div>
                        <div>
                            <h4 class="font-bold text-lg mb-1">实时监控</h4>
                            <p class="text-gray-600">Sentinel 提供了实时监控功能，可以查看各个服务实例的流量数据和限流状态。通过控制台或监控系统，开发者可以监控整个集群的流量情况，并进行相应的调整。</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="bg-white p-6 rounded-xl shadow-md mb-12">
                <h3 class="text-xl font-bold mb-4 text-gray-800">配置示例</h3>
                <pre class="bg-gray-800 text-gray-100 p-4 rounded-lg overflow-x-auto">
                    <code class="language-yaml">
# Sentinel 集群配置示例
# 使用 Redis 作为数据存储和共享
spring:
  cloud:
    sentinel:
      transport:
        dashboard: localhost:8080 # Sentinel 控制台地址
        port: 8719 # Sentinel 服务端口
      datasource:
        redis:
          host: localhost
          port: 6379
                    </code>
                </pre>
            </div>
            
            <div class="grid md:grid-cols-3 gap-6">
                <div class="bg-white p-6 rounded-xl shadow-md">
                    <h4 class="font-bold mb-3 text-gray-800 flex items-center">
                        <i class="fas fa-globe-americas text-indigo-500 mr-2"></i>全局流量控制
                    </h4>
                    <p class="text-gray-600 text-sm">集群模式确保了在整个分布式系统中对流量的全局控制，避免了某个服务实例因请求过多而导致系统整体崩溃的情况。</p>
                </div>
                <div class="bg-white p-6 rounded-xl shadow-md">
                    <h4 class="font-bold mb-3 text-gray-800 flex items-center">
                        <i class="fas fa-cog text-indigo-500 mr-2"></i>灵活配置
                    </h4>
                    <p class="text-gray-600 text-sm">Sentinel 提供了多种限流策略，可以根据业务需求灵活配置，如 QPS 限流、并发线程数限制等。</p>
                </div>
                <div class="bg-white p-6 rounded-xl shadow-md">
                    <h4 class="font-bold mb-3 text-gray-800 flex items-center">
                        <i class="fas fa-shield-alt text-indigo-500 mr-2"></i>容错与恢复
                    </h4>
                    <p class="text-gray-600 text-sm">Sentinel 的限流机制可以在服务负载过高时自动进行熔断和降级，从而提高系统的容错性和恢复能力。</p>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12">
        <div class="container mx-auto px-4 max-w-5xl">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-4 md:mb-0">
                    <h3 class="text-xl font-bold text-white mb-2">技术小馆</h3>
                    <p class="text-gray-400">专业的分布式系统解决方案</p>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" class="text-indigo-300 hover:text-white transition-colors flex items-center">
                        <i class="fas fa-external-link-alt mr-2"></i>访问我们的语雀知识库
                    </a>
                </div>
            </div>
            <div class="border-t border-gray-800 mt-8 pt-8 text-center text-sm text-gray-500">
                &copy; 2023 技术小馆. 保留所有权利.
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'dark',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```